var myChart = echarts.init(document.getElementById("idx1"));
var option = {
    title:{
        text:"手机品牌销量--zzf",
        left: 'center',
    },
    grid: {
        left:'18%',
        right: '20%',
        bottom: '22%',
        top:'19%',
    },
    xAxis:{type:'category',
        data: ["A","B","C","D"],
        name: '国内智能设备厂商',
    },
    yAxis:{
        name:"y",
        min: 100,
        max: 2000,
    },
    legend: {
        bottom: 'bottom',
    },
    series: [{
        type:'bar',
        name:'手机销量',
        data: [500,400,200,300],
        label: {
            show: true,
            position: 'top',
        },
        stack: '总量',
    },{
        type:'bar',
        name: 'PC销量',
        data: [570,300,290,530],
        label: {
            show: true,
            position: 'top',
        },
        stack: '总量',
    },{
        type:'bar',
        name: 'ipad销量',
        data: [350,600,170,230],
        label: {
            show: true,
            position: 'top',
        },
        stack: '总量',
    }],

};
myChart.setOption(option);

var myChart2 = echarts.init(document.getElementById("idx2"));
var option2 = {
    title:{
        text:"3D散点--zzf",
        left: 'center',
    },
        grid3D: {},
        xAxis3D: {},
        yAxis3D: {},
        zAxis3D: {},
        series:[{
            type:'scatter3D',
            data:[[1,1,1],[2,3,4]],
        }],
};
myChart2.setOption(option2);

var myChart4 = echarts.init(document.getElementById("idx4"))
var option4 = {
    title:{
        text:"地图--zzf",
        left: 'center',
    },
    visualMap: {
        max:15,
        min:1,
        range:[2,10],
        inRand:{
            color:['green','yellow']
        },
        calculable:'true',
        top:'bottom',
        left:'center',
        orient:'horizontal',
    },
    series:{
        type:'map',
        map: 'china',
        selectedMode: 'multiple',
        roam: true,
        data: [{
            name: '浙江',
            value: 10,
            label: {
                show: true,
                color:'black',
            },
            itemStyle: {
                areaColor: 'yellow',
            },
        },{
            name: '福建',
            value: 5,
            label: {
                show: true,
            },
        },{
            name: '广东',
            value: 1,
            label: {
                show: true,
            },
            itemStyle: {
                areaColor: 'red',
            },
        }],
    },
};
myChart4.setOption(option4)
var myChart3 = echarts.init(document.getElementById("idx3"))
var option3 = {
    xAxis: {
        name: '日期',
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
    },
    yAxis: {
        name: '销售量',
        type: 'value',
        // data: [10,20,30,40],
    },
    title: {
        text: 'XX销量--zzf',
        left: 'center',
    },
    series:{
        type:'line',
        data:[35,42,18,26,39,5,40],
        label: {
            show: true,
        },
    },
};
myChart3.setOption(option3)
var myChart5 = echarts.init(document.getElementById("idx5"))
var option5 = {
      series: [
        {
          name: 'Pressure',
          type: 'gauge',
          detail: {
            formatter: '{value}'
          },
          data: [{
              value: 90,
              name:'速度',
            }],
        min: 0,
        max: 300,
        },
      ]
};
myChart5.setOption(option5);  
var myChart6 = echarts.init(document.getElementById("idx6"))
var option6 = {
    xAxis: {
        type: 'category',
    },
    yAxis: {
    },
    title: {
        text: '石子落地位置--zzf',
        left: 'center',
    },
    series:{
        symbolSize: 20,
        type:'scatter',
        data:[5,9,1,6,3],
    },
};
myChart6.setOption(option6);
var myChart7 = echarts.init(document.getElementById("idx7"));
option7 = {
    title: {
        text: '产品制作--zzf',
        left: 'center',
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      }
    },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    xAxis: [
      {
        type: 'category',
        data: ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'],
        axisTick: {
          alignWithLabel: true
        }
      }
    ],
    yAxis: [
      {
        name:'销量',
        type: 'value'
      }
    ],
    label: {
        show: true,
    }, 
    series: [{
        name: '荣耀销量',
        type: 'bar',
        data: [85, 69, 71, 25, 79, 82, 80],
      },
      {
        name:'小米销量',
        data: [74, 85, 57, 68, 72, 47, 91],
        type: 'line'
      }
    ],
  };
myChart7.setOption(option7);
var myChart8 = echarts.init(document.getElementById("idx8"));

var option8 ={
    series:{
        type:'pie',
        data:[{
            value: 1,
            name: '优',
        },{
            value: 3,
            name: '良',
        },{
            value: 2,
            name: '差',
        }],
    },
    title:{
        text:'人数占比',
        subtext:'xxxxxt',
    },
};
myChart8.setOption(option8);
var myChart9 = echarts.init(document.getElementById("idx9"));
var option9 = {
    grid: [
        {
            top: '15%',  bottom: '65%',
            left: '90%',  right: '80%',
        },
        {
            left: '90%', right: '80%',
            bottom: '10%',   top: '65%',
        },
      ],
    xAxis: [{gridIndex: 0,        type: 'category',
    data: ['周一','周二','周三','周四','周五','周六','周日'],
    name: '日期',},
      {gridIndex: 1, type: 'category',
      data: ['周一','周二','周三','周四','周五','周六','周日'],
      name: '日期',},
  ],
    yAxis: [{ gridIndex: 0,},
      {gridIndex: 1,},
  ],
      legend: {
          top:'left',
       },
      series: [{
          type:'line',
          data:[85,71,74,89,47,91,78],
          label: {
              show: true,
          },
          areaStyle:{},
          name:'荣耀销量',
          xAxisIndex:0,
          yAxisIndex:0,
        },{
           type:'line',
           data:[72,47,57,78,74,85,57],
           label: {
               show: true,
           },
           name:'小米销量',
           areaStyle:{},
           xAxisIndex:0,
           yAxisIndex:0,
         },{
           type:'bar',
           data:[85,71,74,89,47,91,78],
           label: {
               show: true,
           },
           name:'荣耀销量',
           xAxisIndex:1,
           yAxisIndex:1,
           stack:'总量1',
         },{
           type:'bar',
           data:[72,47,57,78,74,85,57],
           label: {
               show: true,
           },
           name:'小米销量',
           xAxisIndex:1,
           yAxisIndex:1,
           stack:'总量1',
         },],
};
myChart9.setOption(option9);